﻿<UserControl x:Class="ScrumFactory.Projects.ProjectDetail"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:props="clr-namespace:ScrumFactory.Projects.Properties"        
             xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers"
             mc:Ignorable="d" 
             d:DesignHeight="499" d:DesignWidth="508">


    <TabControl Style="{StaticResource WindowTabControl}">
        <TabControl.Items>
            <TabItem Header="{Binding PanelName}">
                <SF_Helpers:PanelLayout Title="{Binding PanelName}">

                    <!-- TOOLBAR -->
                    <SF_Helpers:PanelLayout.Toolbar>
                        <ToolBar Grid.Row="0">
                            <MenuItem Style="{StaticResource GoBackMenuItem}"/>
                        </ToolBar>
                    </SF_Helpers:PanelLayout.Toolbar>

                    <SF_Helpers:PanelLayout.Content>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>

                            <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.Project_number}"/>
                            <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource LabelTextBlock}" Text="{Binding Project.ProjectNumber}"/>

                            <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.Project_name}"/>
                            <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Project.ProjectName, UpdateSourceTrigger=PropertyChanged}" MaxLength="200" HorizontalAlignment="Stretch"/>

                            <TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.Customer}"/>
                            <ComboBox Grid.Row="2" Grid.Column="1"
                                  HorizontalAlignment="Stretch"
                                  IsEditable="True"
                                  Text="{Binding Project.ClientName, UpdateSourceTrigger=PropertyChanged}"
                                  ItemsSource="{Binding Clients}"/>

                            <TextBlock                          
                                Grid.Column="0" Grid.Row="3"           
                                Style="{StaticResource LabelTextBlock}"            
                                Text="{x:Static props:Resources.Platform}"
                                VerticalAlignment="Top"/>
                            <ComboBox Grid.Column="1" Grid.Row="3"
                                  HorizontalAlignment="Stretch"
                                  IsEditable="True"
                                  Text="{Binding Project.Platform, UpdateSourceTrigger=PropertyChanged}"
                                  ItemsSource="{Binding Platforms}"/>


                            <TextBlock Grid.Row="4" Grid.Column="0" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.Project_abstract}" VerticalAlignment="Top"/>
                            <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Project.Description, UpdateSourceTrigger=PropertyChanged}" MaxLength="255"                        
                         HorizontalAlignment="Stretch" Height="80"
                         AcceptsReturn="True" TextWrapping="Wrap"/>

                            <TextBlock Grid.Row="5" Grid.Column="0" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.Code_repository_path}" />
                            <TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Project.CodeRepositoryPath, UpdateSourceTrigger=PropertyChanged}" MaxLength="300"                        
                         HorizontalAlignment="Stretch"/>

                            <TextBlock Grid.Row="6" Grid.Column="0" Style="{StaticResource LabelTextBlock}" Text="{x:Static props:Resources.Doc_repository_path}" />
                            <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding Project.DocRepositoryPath, UpdateSourceTrigger=PropertyChanged}" MaxLength="300"                        
                         HorizontalAlignment="Stretch"/>

                            <CheckBox Grid.Row="7" Grid.Column="1"
                                      IsChecked="{Binding Project.AnyoneCanJoin}"
                                      Content="{x:Static props:Resources.Anyone_can_join}"/>

                        </Grid>
                    </SF_Helpers:PanelLayout.Content>

                </SF_Helpers:PanelLayout>
            </TabItem>
        </TabControl.Items>
    </TabControl>

</UserControl>
